<?php include('header.php'); ?>

<!-- additional javascript hear -->
	<script type="text/javascript"> 
		// Place all Javascript code here
		$(document).ready(function(){
 			$("label.inlined + .input-text").each(function (type) {
		     	$(this).focus(function () {
		      		$(this).prev("label.inlined").addClass("focus");
		     	});
		     	$(this).keypress(function () {
		      		$(this).prev("label.inlined").addClass("has-text").removeClass("focus");
		     	});
		     	$(this).blur(function () {
		      		if($(this).val() == "") {
		      			$(this).prev("label.inlined").removeClass("has-text").removeClass("focus");
		      		}
		     	});
		    });
		});
	</script> 

</head>
<body>

    	<!-- FB CODE -->
		<div id="fb-root"></div>
		<script type="text/javascript">
			window.fbAsyncInit = function() {
	        	FB.init({appId: '<?=$appkey?>', status: true, cookie: true, xfbml: true});
	 
	            /* All the events registered */
	            FB.Event.subscribe('auth.login', function(response) {
	    			// do something with response
	                login();
	        	});
	
	            FB.Event.subscribe('auth.logout', function(response) {
	            // do something with response
	                logout();
	          	});
	   		};
	
	        (function() {
		        var e = document.createElement('script');
	            e.type = 'text/javascript';
	            e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
		          e.async = true;
	            document.getElementById('fb-root').appendChild(e);
	   	 	}());
	 
	        function login(){
	        	document.location.href = "<?=$base_url?>";
	     	}
	
	        function logout(){
	        	document.location.href = "<?=$base_url?>";
	 		}
		</script>
		<!-- END OF FB CODE -->

<div id="wrapper">
<!-- menu -->
<?php include('menu.php'); ?>
<!-- end menu -->

<!-- navigator -->
<?php include('navigator.php'); ?>
<!-- nav end -->

<div class="container">
  	<div class="span-960">
  	<h2>Sign Up<hr /></h2>
		<p id="buttons">
			<fb:login-button onlogin="login();" size="large" perms="email,offline_access,user_birthday,status_update,publish_stream">Connect with facebook</fb:login-button>
		</p>
  	<?php echo validation_errors('<div class="error">', '</div>'); ?>
	<?php echo form_open('signup');?>      
		<p>
		  <label for="fieldName">Full Name</label>
          <label for="fieldName" class="inlined">Full Name..</label>
          <input class="input-text" id="fieldName" name="username"  type="text" size="50" />
		  
		  <label for="fieldEmail">Email</label>
          <label for="fieldEmail" class="inlined">Email..</label>
          <input  class="input-text" id="fieldEmail" name="email" type="text" size="50" />

		  <label for="fieldPwd">Password</label>
          <label for="fieldPwd" class="inlined">Password..</label>
          <input class="input-text" id="fieldPwd" name="password"  type="password" size="50" />

		  <label for="fieldConfirmPwd">Confirm Password</label> 
          <label for="fieldConfirmPwd" class="inlined">Password Again..</label> 
          <input class="input-text" id="fieldConfirmPwd" name="repassword" type="password" size="50" />

		  <label></label>
          <input  class="button" type="submit" value="&raquo; Sign Up" />
        </p>
      </form>
	</div>

<div class="infobar">
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/apps/application.php?id=23567002744" scrolling="no" frameborder="0" style="border:none; width:450px; height:80px"><iframe>
</div>

</div>
<!-- footer -->
<?php include('footer.php');?>
<!-- footer end -->
</div>
</body>
</html>